Schema(name="ukefu")
    Cube(name="满意度")
        View(alias="agentservice")
            SQL
                |    <![CDATA[
                |        select * from uk_agentservice where satisfaction = 1 !{skill ? "AND agentskill IN (" + skill + ")" : ""} !{agent ? "AND agentno = '" + agent + "'" : ""} !{orgi ? "AND orgi = '" + orgi + "'" : ""} !{begin ? "AND satistime >= str_to_date('" + begin + "', '%Y-%m-%d %H:%i:%s')" : ""} !{end ? "AND satistime <= str_to_date('" + end + " 23:59:59', '%Y-%m-%d %H:%i:%s')" : ""}
                |    ]]>
        Dimension(name="agent", foreignKey="agentno")
            Hierarchy(hasAll="true", allMemberName="合计", primaryKey="id")
                Table(name="cs_user")
                Level(name="坐席", column="uname", uniqueMembers="false", type="")
        Dimension(name="skill", foreignKey="agentskill")
            Hierarchy(hasAll="true", allMemberName="合计", primaryKey="id")
                Table(name="uk_organ")
                Level(name="技能组", column="name", uniqueMembers="false", type="")
        Dimension(name="time")
            Hierarchy(hasAll="true", allMemberName="合计")
                Level(name="日期", column="satistime", uniqueMembers="false")
                    KeyExpression
                        SQL(dialect="generic") date_format(agentservice.satistime,'%Y-%m-%d')
                        SQL(dialect="mysql") ANY_VALUE(date_format(agentservice.satistime,'%Y-%m-%d'))
                        SQL(dialect="oracle") TO_DATE(agentservice.satistime,'YYYY-MM-DD')
        Dimension(name="comment")
            Hierarchy(hasAll="true", allMemberName="合计")
                Level(name="满意度", column="satislevel", uniqueMembers="false", type="")
        Measure(name="评价", column="id", aggregator="count", formatString="")
